Conversation
…egrate DetailCard component
…samples and reactions
… in ExplorerComponent
…d improve reagent handling in ExplorerContainer
…ames, and improve reaction filtering logic
5b362ff to
512dd9f
Compare
|
|
||
| module Chemotion | ||
| class ExplorerAPI < Grape::API | ||
|
|
There was a problem hiding this comment.
Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning.
|
|
||
| after_validation do | ||
| @collection = current_user | ||
| .collections |
There was a problem hiding this comment.
Layout/MultilineMethodCallIndentation: Align .collections with current_user on line 14.
| after_validation do | ||
| @collection = current_user | ||
| .collections | ||
| .where(is_shared: false) |
There was a problem hiding this comment.
Layout/MultilineMethodCallIndentation: Align .where with current_user on line 14.
| @collection = current_user | ||
| .collections | ||
| .where(is_shared: false) | ||
| .find_by(id: params[:collection_id]) |
There was a problem hiding this comment.
Layout/MultilineMethodCallIndentation: Align .find_by with current_user on line 14.
|
|
||
| get do | ||
| samples = @collection | ||
| .samples |
There was a problem hiding this comment.
Layout/MultilineMethodCallIndentation: Align .samples with @collection on line 23.
| product_ids: r.products.pluck(:id), | ||
| created_at: r.created_at, | ||
| updated_at: r.updated_at, | ||
| reaction_svg_file: r.reaction_svg_file |
There was a problem hiding this comment.
Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.
| } | ||
| end | ||
|
|
||
|
|
There was a problem hiding this comment.
Layout/EmptyLines: Extra blank line detected.
|
|
||
| molecule_ids = samples.pluck(:molecule_id).compact.uniq | ||
| molecules = Molecule | ||
| .where(id: molecule_ids) |
There was a problem hiding this comment.
Layout/MultilineMethodCallIndentation: Align .where with Molecule on line 46.
| molecule_ids = samples.pluck(:molecule_id).compact.uniq | ||
| molecules = Molecule | ||
| .where(id: molecule_ids) | ||
| .select(:id, :cano_smiles, :inchikey, :iupac_name) |
There was a problem hiding this comment.
Layout/MultilineMethodCallIndentation: Align .select with Molecule on line 46.
| { | ||
| samples: samples.as_json, | ||
| reactions: reactions.as_json, | ||
| molecules: molecules.as_json |
There was a problem hiding this comment.
Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.
LCOV of commit
|
…and subtree height calculation
…sample search functionality
rather 1-story 1-commit than sub-atomic commits
commit title is meaningful => git history search
commit description is helpful => helps the reviewer to understand the changes
code is up-to-date with the latest developments of the target branch (rebased to it or whatever) => ⏩-merge for linear history is favoured
added code is linted
tests are passing (at least locally): we still have some random test failure on CI. thinking of asking spec/examples.txt to be commited
in case the changes are visible to the end-user, video or screenshots should be added to the PR => helps with user testing
testing coverage improvement is improved.
CHANGELOG : add a bullet point on top (optional: reference to github issue/PR )
parallele PR for documentation on docusaurus if the feature/fix is tagged for a release